package com.lc.customer;

import com.api.service.TestService;
import org.apache.commons.lang.StringUtils;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableDubbo
@SpringBootApplication
public class CustomerApplication {
	@DubboReference(version = "1.0.0",timeout = 300)
	private   TestService testService;
	public static void main(String[] args) {

		SpringApplication.run(CustomerApplication.class, args);

	}
	@GetMapping("/getMsg")
	public String getMessage(){
		return StringUtils.join(testService.findMessage(),"");
	}

}
